Back to the Vavoom Forum Archives
dapsaille
Janis Legzdinsh
dapsaille
Janis Legzdinsh
Index: source/d_scache.cpp
===================================================================
--- source/d_scache.cpp (revision 1646)
+++ source/d_scache.cpp (working copy)
@@ -199,7 +199,7 @@
if ((height < 0) || (height > 256))
Sys_Error("D_SCAlloc: bad cache height %d\n", height);
- size = (int)&((surfcache_t *)0)->data[size];
+ size = &((surfcache_t *)0)->data[size] - (vuint8*)0;
size = (size + 3) & ~3;
if (size > sc_size)
Sys_Error("D_SCAlloc: %i > cache size", size);
dapsaille
scen
# emerge --info Portage 2.1-r1 (default-linux/amd64/2006.0, gcc-4.1.1, glibc-2.3.6-r4, 2.6.17-gentoo-r4 x86_64) ================================================================= System uname: 2.6.17-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3800+ Gentoo Base System version 1.6.15 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [disabled] app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo" CXXFLAGS="-march=k8 -O2 -pipe" DISTDIR="/var/tmp/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.ngi.it http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/ ftp://ftp.unina.it/pub/linux/distributions/gentoo" LANG="it_IT@euro" LC_ALL="it_IT@euro" LINGUAS="it" MAKEOPTS="-j2" PKGDIR="/var/tmp/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X alsa arts avi berkdb bitmap-fonts cli crypt cups dlloader dri eds emboss encode flac foomaticdb fortran gif gpm gtk2 hal imlib isdnlog jpeg kde kdeenablefinal lzw lzw-tiff mp3 mpeg ncurses nls nptl ogg opengl pam pcre pdflib perl png pppd python qt qt3 quicktime readline reflection sdl session spell spl ssl tcpd theora tiff truetype truetype-fonts type1-fonts usb vorbis xml xorg xpm xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_penmount kernel_linux linguas_it userland_GNU video_cards_fbdev video_cards_nv video_cards_nvidia video_cards_vesa" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTSI've applied successfully the posted patch, but i run into the same error. I think the involved code lines in source/sv_acs.cpp are
[...]
ACSVM_CASE(PCD_CaseGotoSorted)
// The count and jump table are 4-byte aligned.
if ((int)ip & 3) // <-- THIS LINE
{
ip += 4 - ((int)ip & 3); // <-- AND THIS LINE
}
{
int numcases = READ_INT32(ip);
[...]
[EDIT]
I suggest to move the topic in "bug reports" section <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) -->
[/EDIT]dapsaille
# emerge --info Portage 2.1-r1 (default-linux/amd64/2006.0, gcc-4.1.1, glibc-2.3.6-r4, 2.6.17-gentoo-r4 x86_64) ================================================================= System uname: 2.6.17-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3800+ Gentoo Base System version 1.6.15 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [disabled] app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo" CXXFLAGS="-march=k8 -O2 -pipe" DISTDIR="/var/tmp/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.ngi.it http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/ ftp://ftp.unina.it/pub/linux/distributions/gentoo" LANG="it_IT@euro" LC_ALL="it_IT@euro" LINGUAS="it" MAKEOPTS="-j2" PKGDIR="/var/tmp/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X alsa arts avi berkdb bitmap-fonts cli crypt cups dlloader dri eds emboss encode flac foomaticdb fortran gif gpm gtk2 hal imlib isdnlog jpeg kde kdeenablefinal lzw lzw-tiff mp3 mpeg ncurses nls nptl ogg opengl pam pcre pdflib perl png pppd python qt qt3 quicktime readline reflection sdl session spell spl ssl tcpd theora tiff truetype truetype-fonts type1-fonts usb vorbis xml xorg xpm xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_penmount kernel_linux linguas_it userland_GNU video_cards_fbdev video_cards_nv video_cards_nvidia video_cards_vesa" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTSI've applied successfully the posted patch, but i run into the same error. I think the involved code lines in source/sv_acs.cpp are
[...]
ACSVM_CASE(PCD_CaseGotoSorted)
// The count and jump table are 4-byte aligned.
if ((int)ip & 3) // <-- THIS LINE
{
ip += 4 - ((int)ip & 3); // <-- AND THIS LINE
}
{
int numcases = READ_INT32(ip);
[...]
[EDIT]
I suggest to move the topic in "bug reports" section <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) -->
[/EDIT]
+1 for the topic move :p
Happy (sort off) to see that it is not my optimisations who make this buzz ^^Janis Legzdinsh
Index: source/sv_acs.cpp
===================================================================
--- source/sv_acs.cpp (revision 1652)
+++ source/sv_acs.cpp (working copy)
@@ -3380,9 +3380,9 @@
ACSVM_CASE(PCD_CaseGotoSorted)
// The count and jump table are 4-byte aligned.
- if ((int)ip & 3)
+ if (ActiveObject->PtrToOffset(ip) & 3)
{
- ip += 4 - ((int)ip & 3);
+ ip += 4 - (ActiveObject->PtrToOffset(ip) & 3);
}
{
int numcases = READ_INT32(ip);
scen
Janis Legzdinsh